package com.gaga.metadata.entity.database;

import com.gaga.metadata.common.enums.ColumnUpdateType;
import com.gaga.metadata.common.enums.DbFilterOperatorType;
import com.gaga.metadata.common.enums.SqlFunctionType;
import com.gaga.metadata.common.enums.StatisticPeriodType;
import com.gaga.metadata.entity.base.BaseColumn;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * Column
 *
 * @author liujia
 * @since 2021/7/19 23:26
 */
@Data
public class DataBaseColumn extends BaseColumn implements Serializable {

    private static final long serialVersionUID = 6438514547501611599L;

    /**
     * 完成的列信息 比如 MZSR varchar(20)
     */

    private String columnFullInfo;


    private ColumnUpdateType columnUpdateType;

    /**
     * 是否度量字段 指标通过度量类型+度量字段计算，比如 sum(je)
     */
    private Boolean isMeasureColumn = false;
    /**
     * 度量类型
     */
    private SqlFunctionType measureType;

    /**
     * 是否维度列
     */
    private Boolean isDimColumn = false;

    /**
     * 统计周期
     */
    private StatisticPeriodType statisticPeriod;

    /**
     * 过滤器类型
     */
    private DbFilterOperatorType dbFilterOperatorType;

    /**
     * 列option
     */
    private List<DataBaseOption> options;

    /**
     * 是否是分布键
     */
    private Boolean isDistributed = false;

}